<!-- modefied by tuyenntt -->
<script language='JavaScript'>
	var timeout = 20000;
	var xmlHttp;
	var finish=true;
	function GetXmlHttpObject()
	{ 
	
		 var objXMLHttp=null
		 if (window.XMLHttpRequest)
		 {
			objXMLHttp=new XMLHttpRequest()

		 }
		 else if (window.ActiveXObject)
		 {
		   objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")							
			   		
		 }
		 return objXMLHttp
	}	
</script>
<!-- Table chua menu ben trai cua application-->
<?php
//include "isa-lib/isa-function/isa_public_function.php";
$v_staff_id = $_SESSION['staff_id'];
//echo $v_staff_id;
?>
<!--Ho so tiep nhan qua mang-->
<div id="APPROVING_NET" style=".display:none">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="left_menu_table">
	<?php
	if ((onegate_is_receiver_for_recordtype_net($v_staff_id,0,$_SESSION["recordtype"]) )
		||(_is_on_menu(_CONST_ONEGATE_RECORD_VIEW,$_SESSION['onegate_public_function_list'],$_SESSION['onegate_granted_function_list']))
	){?>
	<tr>
		<td class="level1" background="<?php echo $_ISA_IMAGE_URL_PATH; ?>left_menu_button.gif">
			<a href="<?php echo $_ISA_WEB_SITE_PATH?>record/approving-net/index.php?fuseaction=DISPLAY_ALL_NET_RECORD_FOR_APPROVING"><?php echo _CONST_LEFT_MENU_RECORD_PRELIMINARY_RECEIVE; ?></a>
		</td>
	</tr>
	<?php
	}if ((onegate_is_receiver_for_recordtype_net($v_staff_id,0,$_SESSION["recordtype"]) )
		||(_is_on_menu(_CONST_ONEGATE_RECORD_VIEW,$_SESSION['onegate_public_function_list'],$_SESSION['onegate_granted_function_list']))
	){?>
	<tr>
		<td class="level1" background="<?php echo $_ISA_IMAGE_URL_PATH; ?>left_menu_button.gif">
			<a href="<?php echo $_ISA_WEB_SITE_PATH?>record/approving-net/index.php?fuseaction=DISPLAY_ALL_NET_RECORD_OFFICIAL_RECEIVE"><?php echo _CONST_LEFT_MENU_RECORD_OFFICIAL_RECEIVE; ?></a>
		</td>
	</tr>
	<?php
	}if ((onegate_is_receiver_for_recordtype_net($v_staff_id,0,$_SESSION["recordtype"]) )
		||(_is_on_menu(_CONST_ONEGATE_RECORD_VIEW,$_SESSION['onegate_public_function_list'],$_SESSION['onegate_granted_function_list']))
	){?>
	<tr>
		<td class="level1" background="<?php echo $_ISA_IMAGE_URL_PATH; ?>left_menu_button.gif">
			<a href="<?php echo $_ISA_WEB_SITE_PATH?>record/approving-net/index.php?fuseaction=DISPLAY_ALL_NET_RECORD_OFFICIALED_RECEIVE"><?php echo _CONST_LEFT_MENU_RECORD_OFFICIALED_RECEIVE; ?></a>
		</td>
	</tr><?php
	}?>
</table>
</div>
<!--Tiep nhan va tra ket qua-->
<div id="RECEIVE_RESULT" style=".display:none">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="left_menu_table">
	<?php
	if ((onegate_is_receiver_for_recordtype($v_staff_id,0,$_SESSION["recordtype"]) )
		||(_is_on_menu(_CONST_ONEGATE_RECORD_VIEW,$_SESSION['onegate_public_function_list'],$_SESSION['onegate_granted_function_list']))
	){?>
	<tr>
		<td class="level1" background="<?php echo $_ISA_IMAGE_URL_PATH; ?>left_menu_button.gif" id ="tiepnhan" ><a href="<?php echo $_ISA_WEB_SITE_PATH?>record/receive/index.php?fuseaction=DISPLAY_ALL_RECORD_FOR_NEW"><?php echo _CONST_LEFT_MENU_RECORD_RECEIVE; ?></a>
		<?php 
			if($is_type ==1)
			{
				$_ISA_CURRENT_MODUL_CODE_TUYENNTT = "RECEIVE_RESULT";
				$v_detail_status_compare = " And C_DETAIL_STATUS<>20 ";
				$v_status_list = "MOI_TIEP_NHAN";			
				$v_show_date = false;
				$v_receive_date = "";			
				include "../record-lib/qry_all_record_tuyenntt.php";				
	   ?>
				<script type="text/javascript">	
				function create_paranmeter_tn ()
				{
					var type ='tn';	
					v_staff_id ='<?php echo $v_staff_id;?>';		
					v_recordtype_filter = '<?php echo ($v_recordtype_filter);?>' ;								
					v_receive_date_filter = '<?php echo ($v_receive_date_filter);?>' ;
					v_status_list= '<?php echo ($v_status_list);?>';		
					v_role = '<?php echo ($v_role);?>' ;
					v_status_of_handover = '<?php echo ($v_status_of_handover);?>' ;
					v_status_of_assigning ='<?php echo ($v_status_of_assigning);?>';
					v_status_of_handle_approve = '<?php echo ($v_status_of_handle_approve);?>';
					v_status_of_chaiman_approve ='<?php echo ($vstatus_of_chaiman_approve);?>';
					v_order_clause = '<?php echo ($v_order_clause);?>';		
					v_detail_status_compare = '<?php echo ($v_detail_status_compare);?>' ;
					v_status_compare = '<?php echo ($v_status_compare);?>';		
					var parameter = "staff_id_" + type + "=" + v_staff_id + "&recordtype_filter_" + type + "=" + v_recordtype_filter + "&receive_date_filter_" + type + "=" + v_receive_date_filter + "&status_list_" + type + "=" + v_status_list + "&role_" + type + "=" + v_role + "&status_of_handover_" + type + "=" + v_status_of_handover + "&status_of_assigning_" + type + "=" + v_status_of_assigning + "&status_of_handle_approve_" + type + "=" + v_status_of_handle_approve +  "&status_of_chaiman_approve_" + type + "=" + v_status_of_chaiman_approve + "&order_clause_" + type + "=" + v_order_clause + "&detail_status_compare_" + type + "=" + v_detail_status_compare+ "&status_compare_" + type + "=" + v_status_compare ;
					return parameter;
				}
				</script>
		<?php
		   }
		 ?>
		<!-- the end of tiep nhan-->
		</td>
	</tr>
	<?php
	}if ((onegate_is_receiver_for_recordtype($v_staff_id,0,$_SESSION["recordtype"]) )
		||(_is_on_menu(_CONST_ONEGATE_RECORD_VIEW,$_SESSION['onegate_public_function_list'],$_SESSION['onegate_granted_function_list']))
	){?>
	<tr>
		<td class="level1" background="<?php echo $_ISA_IMAGE_URL_PATH; ?>left_menu_button.gif" id="bosung"><a href="<?php echo $_ISA_WEB_SITE_PATH?>record/receive/index.php?fuseaction=DISPLAY_ALL_RECORD_FOR_SUPPLYMENT"><?php echo _CONST_LEFT_MENU_RECORD_ADD; ?></a>			
		<?php	
			if($is_type ==1)
			{
				$v_detail_status_compare = " And C_DETAIL_STATUS = 20 ";
				$v_status_list = "DANG_THU_LY";			
				$v_show_date = false;
				$v_receive_date = "";
				include "../record-lib/qry_all_record_tuyenntt.php";
		?>
				<script type="text/javascript">	
				function create_paranmeter_bs ()
				{
					var type ='bs';	
					v_receive_date_filter = '<?php echo ($v_receive_date_filter);?>' ;
					v_status_list= '<?php echo ($v_status_list);?>';		
					v_role = '<?php echo ($v_role);?>' ;
					v_status_of_handover = '<?php echo ($v_status_of_handover);?>' ;
					v_status_of_assigning ='<?php echo ($v_status_of_assigning);?>';
					v_status_of_handle_approve = '<?php echo ($v_status_of_handle_approve);?>';
					v_status_of_chaiman_approve ='<?php echo ($vstatus_of_chaiman_approve);?>';
					v_order_clause = '<?php echo ($v_order_clause);?>';		
					v_detail_status_compare = '<?php echo ($v_detail_status_compare);?>' ;
					v_status_compare = '<?php echo ($v_status_compare);?>';		
					var parameter = "receive_date_filter_" + type + "=" + v_receive_date_filter + "&status_list_" + type + "=" + v_status_list + "&role_" + type + "=" + v_role + "&status_of_handover_" + type + "=" + v_status_of_handover + "&status_of_assigning_" + type + "=" + v_status_of_assigning + "&status_of_handle_approve_" + type + "=" + v_status_of_handle_approve +  "&status_of_chaiman_approve_" + type + "=" + v_status_of_chaiman_approve + "&order_clause_" + type + "=" + v_order_clause + "&detail_status_compare_" + type + "=" + v_detail_status_compare+ "&status_compare_" + type + "=" + v_status_compare ;
					return parameter;
				}
				</script>
		<?php
		 }
		?>		
		</td>
	</tr>
	<?php
	}if ((onegate_is_receiver_for_recordtype($v_staff_id,0,$_SESSION["recordtype"]) )
		||(_is_on_menu(_CONST_ONEGATE_RECORD_VIEW,$_SESSION['onegate_public_function_list'],$_SESSION['onegate_granted_function_list']))
	){?>
	<tr>
		<td class="level1" background="<?php echo $_ISA_IMAGE_URL_PATH; ?>left_menu_button.gif" id="danggiaiquyet"><a href="<?php echo $_ISA_WEB_SITE_PATH?>record/receive/index.php?fuseaction=DISPLAY_ALL_RECORD_SOLVING"><?php echo _CONST_LEFT_MENU_RECORD_SOLVING; ?></a>
		<?php
			if($is_type ==1)
			{
				$v_detail_status_compare = " And C_DETAIL_STATUS <> 20 ";
				$v_status_list = "DANG_THU_LY,TRINH_KY";				
				$v_show_date = false;
				$v_receive_date = "";				
				include "../record-lib/qry_all_record_tuyenntt.php";			
		?>		
			<script type="text/javascript">				
				function create_paranmeter_dgq ()
				{
					var type ='dgq';	
					v_receive_date_filter = '<?php echo ($v_receive_date_filter);?>' ;
					v_status_list= '<?php echo ($v_status_list);?>';		
					v_role = '<?php echo ($v_role);?>' ;
					v_status_of_handover = '<?php echo ($v_status_of_handover);?>' ;
					v_status_of_assigning ='<?php echo ($v_status_of_assigning);?>';
					v_status_of_handle_approve = '<?php echo ($v_status_of_handle_approve);?>';
					v_status_of_chaiman_approve ='<?php echo ($vstatus_of_chaiman_approve);?>';
					v_order_clause = '<?php echo ($v_order_clause);?>';		
					v_detail_status_compare = '<?php echo ($v_detail_status_compare);?>' ;
					v_status_compare = '<?php echo ($v_status_compare);?>';		
					var parameter = "receive_date_filter_" + type + "=" + v_receive_date_filter + "&status_list_" + type + "=" + v_status_list + "&role_" + type + "=" + v_role + "&status_of_handover_" + type + "=" + v_status_of_handover + "&status_of_assigning_" + type + "=" + v_status_of_assigning + "&status_of_handle_approve_" + type + "=" + v_status_of_handle_approve +  "&status_of_chaiman_approve_" + type + "=" + v_status_of_chaiman_approve + "&order_clause_" + type + "=" + v_order_clause + "&detail_status_compare_" + type + "=" + v_detail_status_compare+ "&status_compare_" + type + "=" + v_status_compare ;
					return parameter;
				}				
			function getAllNumberRecordTiepNhan()
			{
				if(finish == true)
				{
					xmlHttp=GetXmlHttpObject();
					if (xmlHttp==null)
					  {
						  alert ("Browser does not support HTTP Request")
						  return
					  } 
					 var url='<?php echo ( _get_current_http_and_host().$_ISA_WEB_SITE_PATH
						);?>' + "number_record.php?";
					/*url = url + create_paranmeter('tn') + '&' + create_paranmeter('bs')+ '&'+ create_paranmeter('dgq')+'&'+ create_paranmeter('kq')+'&type='+'TIEP_NHAN';*/
					url = url + create_paranmeter_tn() + '&' + create_paranmeter_bs()+ '&'+ create_paranmeter_dgq()+'&is_granted='+'<?php echo $v_is_granted_view_record;?>'+'&type='+'TIEP_NHAN';
					//alert(url);
					xmlHttp.onreadystatechange=onreadystatechangeTiepNhan; 	
					xmlHttp.open("GET",url,true)
					xmlHttp.send(null)
				}
			}
			function onreadystatechangeTiepNhan()
			{	
				if (xmlHttp.readyState==1)
				{
					finish =false;
				}
				if ((xmlHttp.readyState==4 || xmlHttp.readyState=="complete"))
				{	
					finish =true;
					//alert(xmlHttp.responseText);
					xmlDoc=xmlHttp.responseXML;	
					tiep_nhan = document.getElementById("tiepnhan");
					bo_sung = document.getElementById("bosung");
					dang_giai_quyet = document.getElementById("danggiaiquyet");	
					
						if(xmlDoc.getElementsByTagName("v_size_tiepnhan")[0].childNodes[0].nodeValue != 0){
						text = '<a href="<?php echo $_ISA_WEB_SITE_PATH?>record/receive/index.php?fuseaction=DISPLAY_ALL_RECORD_FOR_NEW"><?php echo _CONST_LEFT_MENU_RECORD_RECEIVE; ?></a>'+'('+xmlDoc.getElementsByTagName("v_size_tiepnhan")[0].childNodes[0].nodeValue +')';
						document.getElementById("tiepnhan").innerHTML = text ;
						}
						
						if(xmlDoc.getElementsByTagName("v_size_bosung")[0].childNodes[0].nodeValue != 0){
							bo_sung ='<a href="<?php echo $_ISA_WEB_SITE_PATH?>record/receive/index.php?fuseaction=DISPLAY_ALL_RECORD_FOR_SUPPLYMENT"><?php echo _CONST_LEFT_MENU_RECORD_ADD; ?></a>	' +'('+ xmlDoc.getElementsByTagName("v_size_bosung")[0].childNodes[0].nodeValue +')';
							document.getElementById("bosung").innerHTML = bo_sung ;	
						}	

						if(xmlDoc.getElementsByTagName("v_size_danggiaiquyet")[0].childNodes[0].nodeValue != 0){
							dang_giai_quyet = '<a href="<?php echo $_ISA_WEB_SITE_PATH?>record/receive/index.php?fuseaction=DISPLAY_ALL_RECORD_SOLVING"><?php echo _CONST_LEFT_MENU_RECORD_SOLVING; ?></a>' +'('+ xmlDoc.getElementsByTagName("v_size_danggiaiquyet")[0].childNodes[0].nodeValue +')';
							document.getElementById("danggiaiquyet").innerHTML = dang_giai_quyet ;	
						}
					/*	if(xmlDoc.getElementsByTagName("v_size_ketqua")[0].childNodes[0].nodeValue != 0){
						kq = '<a href="<?php echo $_ISA_WEB_SITE_PATH?>record/result/index.php"><?php echo _CONST_LEFT_MENU_RECORD_RESULT; ?></a>' +'('+ xmlDoc.getElementsByTagName("v_size_ketqua")[0].childNodes[0].nodeValue +')';
						document.getElementById("kq").innerHTML = kq ;	
						}*/
				}
			}
			self.setInterval("getAllNumberRecordTiepNhan()",timeout);	
			</script>
			<?php
			 }
			?>
		</td>
	</tr>
	<?php
	}if ((onegate_is_receiver_for_recordtype($v_staff_id,0,$_SESSION["recordtype"]) )
		||(_is_on_menu(_CONST_ONEGATE_RECORD_VIEW,$_SESSION['onegate_public_function_list'],$_SESSION['onegate_granted_function_list']))
	){
	if (_get_item_attr_by_id($_SESSION['arr_all_staff'],$_SESSION['staff_id'],'position_code') == 'CBTKQ') {?>
	<tr>
		<td class="level1" background="<?php echo $_ISA_IMAGE_URL_PATH; ?>left_menu_button.gif" id ='kq'>
			<a href="<?php echo $_ISA_WEB_SITE_PATH?>record/result/index.php"><?php echo _CONST_LEFT_MENU_RECORD_RESULT; ?></a>
		<?php
		if($is_type ==1)
			{
				$_ISA_CURRENT_MODUL_CODE_TUYENNTT = "RECEIVE_RESULT";
				$v_detail_status_compare = " And C_DETAIL_STATUS<>51 ";
				$v_status_list = "CAP_PHEP,TU_CHOI";					
				$v_show_date = false;
				$v_receive_date = "";			
				include "../record-lib/qry_all_record_tuyenntt.php";
		?>
			<script type="text/javascript">				
				function create_paranmeter_kq()
				{
					var type ='kq';	
					v_receive_date_filter = '<?php echo ($v_receive_date_filter);?>' ;
					v_status_list= '<?php echo ($v_status_list);?>';		
					v_role = '<?php echo ($v_role);?>' ;
					v_status_of_handover = '<?php echo ($v_status_of_handover);?>' ;
					v_status_of_assigning ='<?php echo ($v_status_of_assigning);?>';
					v_status_of_handle_approve = '<?php echo ($v_status_of_handle_approve);?>';
					v_status_of_chaiman_approve ='<?php echo ($vstatus_of_chaiman_approve);?>';
					v_order_clause = '<?php echo ($v_order_clause);?>';		
					v_detail_status_compare = '<?php echo ($v_detail_status_compare);?>' ;
					v_status_compare = '<?php echo ($v_status_compare);?>';		
					var parameter = "receive_date_filter_" + type + "=" + v_receive_date_filter + "&status_list_" + type + "=" + v_status_list + "&role_" + type + "=" + v_role + "&status_of_handover_" + type + "=" + v_status_of_handover + "&status_of_assigning_" + type + "=" + v_status_of_assigning + "&status_of_handle_approve_" + type + "=" + v_status_of_handle_approve +  "&status_of_chaiman_approve_" + type + "=" + v_status_of_chaiman_approve + "&order_clause_" + type + "=" + v_order_clause + "&detail_status_compare_" + type + "=" + v_detail_status_compare+ "&status_compare_" + type + "=" + v_status_compare ;
					return parameter;
				}	
			</script>
		<?php
		 }
		?>	
		</td>
	</tr><?php
	}}?>

	<!-- Leav_begin :luc 9h 00 ,21/05/08 ben menu phai cua bo phan TNHS-->
	<!-- Leav_begin :luc 11h00 ,21/05/08-->
	<?php  //leav_14082008_11111111111
	if($v_size_2_phat==1 ||$v_staff_id =='1858'){ //echo 'testiiiiiiiiii:='.$v_staff_id;//$v_staff_id =='1858'?>
	<!-- Leav_begin :21/05/08 them-->
	<tr>
	<td class="level1" background="<?php echo $_ISA_IMAGE_URL_PATH; ?>left_menu_button.gif">
			<a href="<?php echo $_ISA_WEB_SITE_PATH?>record/receive/index.php?fuseaction=DISPLAY_ALL_RECORD_NOTIFY_PHAT"><?php echo 	      _CONST_LEFT_MENU_RECORD_NOTIFY_PHAT_2; ?></a>
	  </td>
	</tr>
	<tr>
	<td class="level1" background="<?php echo $_ISA_IMAGE_URL_PATH; ?>left_menu_button.gif">
			<a href="<?php echo $_ISA_WEB_SITE_PATH?>record/receive/index.php?fuseaction=DISPLAY_ALL_RECORD_DA_NOP_PHAT"><?php echo _CONST_LEFT_MENU_RECORD_NOTIFY_DA_NOP_PHAT; ?></a>
	  </td>
	</tr>
	<?php } ?>
	<?php if($v_size_2_thue==1 ||$v_staff_id =='1858'){?>
	<!-- Leav_begin_17112008 -->
	<tr style="display:none">
	<td class="level1" background="<?php echo $_ISA_IMAGE_URL_PATH; ?>left_menu_button.gif">
			<a href="<?php echo $_ISA_WEB_SITE_PATH?>record/receive/index.php?fuseaction=DISPLAY_ALL_RECORD_NOTIFY_TAX_TU_CQUAN"><?php echo _CONST_LEFT_MENU_RECORD_NOTIFY_THUE_TU_CQUAN; ?></a>
	  </td>
	</tr>
	<!-- Leav_end_17112008 -->
	<tr>
	<td class="level1" background="<?php echo $_ISA_IMAGE_URL_PATH; ?>left_menu_button.gif">
			<a href="<?php echo $_ISA_WEB_SITE_PATH?>record/receive/index.php?fuseaction=DISPLAY_ALL_RECORD_NOTIFY_TAX"><?php echo 	      _CONST_LEFT_MENU_RECORD_NOTIFY_THUE_2; ?></a>
	  </td>
	</tr>
	
	<tr>
	<td class="level1" background="<?php echo $_ISA_IMAGE_URL_PATH; ?>left_menu_button.gif">
			<a href="<?php echo $_ISA_WEB_SITE_PATH?>record/receive/index.php?fuseaction=DISPLAY_ALL_RECORD_DA_NOP_THUE"><?php echo  _CONST_LEFT_MENU_RECORD_NOTIFY_DA_NOP_THUE; ?></a>
	  </td>
	</tr>
	<?php }  //leav_14082008_11111111111
	//nieuvv--101108--hien thi link cong viec dac biet
	// $_ISA_CURRENT_MODUL_CODE_TUYENNTT
	// $v_staff_id
	// $v_record_filter		
	for($j = 0 ; $j < $v_cout; $j ++)
	{
		for($i = 0 ; $i < $v_count_spec_worktype ; $i ++)
		{			
			if($arr_all_spec_worktype[$i]['C_UPDATE_METHOD_START'] == 'LEFT_MODULE_UPDATE_RECIEVE'&& $arr_all_spec_worktype[$i]['FK_WORKTYPE_START'] == $arr_list[$j][0])
			{
				$v_pk_spec_worktype = $arr_all_spec_worktype[$i]['PK_SPEC_WORKTYPE'];
				$v_id_spec_worktype = $arr_all_spec_worktype[$i]['FK_WORKTYPE_START'];
				$v_name_spec_worktype = _getname($arr_list,$arr_all_spec_worktype[$i]['FK_WORKTYPE_START']);
				//echo $v_name_spec_worktype;
				?>
				<tr>
	<td class="level1" background="<?php echo $_ISA_IMAGE_URL_PATH; ?>left_menu_button.gif">
			<a href="<?php echo $_ISA_WEB_SITE_PATH?>record/receive/index.php?fuseaction=DISPLAY_ALL_RECORD_SPEC_WORK&type_spec_dsp=<?php echo $v_pk_spec_worktype;?>"><?php echo  spec_work_show_left_menu_links($_ISA_CURRENT_MODUL_CODE,$v_staff_id,$v_recordtype_filter); ?></a>
	  </td>
	</tr>
				 <?php				 
			}
		}
	}

		
	//the-end-nieuvv-101108--
	
	?>
	
</table>
</div>
<!--Thu ly ho so-->
<div id="HANDLE" style=".display:none">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="left_menu_table">
	<?php
	if ((onegate_is_handler_for_recordtype($v_staff_id,0,$_SESSION["recordtype"])) 
		||(onegate_is_permission_update_rate_of_progress_for_recordtype($v_staff_id,0,$_SESSION["recordtype"]))
		||(_is_on_menu(_CONST_ONEGATE_RECORD_VIEW,$_SESSION['onegate_public_function_list'],$_SESSION['onegate_granted_function_list']))
	){?>
	<tr>
		<td class="level1" background="<?php echo $_ISA_IMAGE_URL_PATH; ?>left_menu_button.gif"  id="dtl"><a href="<?php echo $_ISA_WEB_SITE_PATH?>record/handle/index.php?fuseaction=DISPLAY_ALL_HANDLING_RECORD"><?php echo _CONST_LEFT_MENU_RECORD_HANDLING; ?></a>	
		<?php
			if($is_type ==2)
			{
				$_ISA_CURRENT_MODUL_CODE_TUYENNTT = 'HANDLE';
				$v_detail_status_compare = " And C_DETAIL_STATUS <> 20 And C_DETAIL_STATUS <> 70 ";
				$v_status_list = "DANG_THU_LY";								
				$v_show_date = false;
				$v_receive_date = "";								
				include "../record-lib/qry_all_record_tuyenntt.php";
		?>		
					<script type="text/javascript">	
				function create_paranmeter_thuly_dtl()
				{
					var parameter = '';	
					v_staff_id ='<?php echo $v_staff_id;?>';		
					v_recordtype_filter = '<?php echo ($v_recordtype_filter);?>' ;								
					v_receive_date_filter = '<?php echo ($v_receive_date_filter);?>' ;
					v_status_list= '<?php echo ($v_status_list);?>';		
					v_role = '<?php echo ($v_role);?>' ;
					v_status_of_handover = '<?php echo ($v_status_of_handover);?>' ;
					v_status_of_assigning ='<?php echo ($v_status_of_assigning);?>';
					v_status_of_handle_approve = '<?php echo ($v_status_of_handle_approve);?>';
					v_status_of_chaiman_approve ='<?php echo ($vstatus_of_chaiman_approve);?>';
					v_order_clause = '<?php echo ($v_order_clause);?>';		
					v_detail_status_compare = '<?php echo ($v_detail_status_compare);?>' ;
					v_status_compare = '<?php echo ($v_status_compare);?>';	
		
					 parameter = "staff_id=" + v_staff_id + "&recordtype_filter=" + v_recordtype_filter + "&receive_date_filter=" + v_receive_date_filter + "&status_list=" + v_status_list + "&role=" + v_role + "&status_of_handover=" + v_status_of_handover + "&status_of_assigning=" + v_status_of_assigning + "&status_of_handle_approve=" + v_status_of_handle_approve +  "&status_of_chaiman_approve=" + v_status_of_chaiman_approve + "&order_clause=" + v_order_clause + "&detail_status_compare=" + v_detail_status_compare+ "&status_compare=" + v_status_compare ;				
					return  parameter;
				}
		</script>
		<?php
			}
		?>
		</td>
	</tr>
	<?php
	}if ((onegate_is_handler_for_recordtype($v_staff_id,0,$_SESSION["recordtype"])) 
		||(onegate_is_permission_update_rate_of_progress_for_recordtype($v_staff_id,0,$_SESSION["recordtype"]))
		||(_is_on_menu(_CONST_ONEGATE_RECORD_VIEW,$_SESSION['onegate_public_function_list'],$_SESSION['onegate_granted_function_list']))
	){?>
	<tr>
		<td class="level1" background="<?php echo $_ISA_IMAGE_URL_PATH; ?>left_menu_button.gif" id="cbs"><a href="<?php echo $_ISA_WEB_SITE_PATH?>record/handle/index.php?fuseaction=DISPLAY_ALL_RECORD_FOR_SUPPLYMENT"><?php echo _CONST_LEFT_MENU_RECORD_WAITING; ?></a>	
		<?php
			if($is_type ==2)
			{
				$v_detail_status_compare = " And C_DETAIL_STATUS = 20 ";
				$v_status_list = "DANG_THU_LY";				
				$v_show_date = false;
				$v_receive_date = "";				
				include "../record-lib/qry_all_record_tuyenntt.php";
		?>
		<script type="text/javascript">		
		function create_paranmeter_thuly_cbs()
		{					
			var parameter = '';	
			type = 'cbs';
			v_staff_id ='<?php echo $v_staff_id;?>';		
			v_recordtype_filter = '<?php echo ($v_recordtype_filter);?>' ;								
			v_receive_date_filter = '<?php echo ($v_receive_date_filter);?>' ;
			v_status_list= '<?php echo ($v_status_list);?>';		
			v_role = '<?php echo ($v_role);?>' ;
			v_status_of_handover = '<?php echo ($v_status_of_handover);?>' ;
			v_status_of_assigning ='<?php echo ($v_status_of_assigning);?>';
			v_status_of_handle_approve = '<?php echo ($v_status_of_handle_approve);?>';
			v_status_of_chaiman_approve ='<?php echo ($vstatus_of_chaiman_approve);?>';
			v_order_clause = '<?php echo ($v_order_clause);?>';		
			v_detail_status_compare = '<?php echo ($v_detail_status_compare);?>' ;
			v_status_compare = '<?php echo ($v_status_compare);?>';				

			 parameter = "receive_date_filter_" + type + "=" + v_receive_date_filter + "&status_list_" + type + "=" + v_status_list + "&role_" + type + "=" + v_role + "&status_of_handover_" + type + "=" + v_status_of_handover + "&status_of_assigning_" + type + "=" + v_status_of_assigning + "&status_of_handle_approve_" + type + "=" + v_status_of_handle_approve +  "&status_of_chaiman_approve_" + type + "=" + v_status_of_chaiman_approve + "&order_clause_" + type + "=" + v_order_clause + "&detail_status_compare_" + type + "=" + v_detail_status_compare+ "&status_compare_" + type + "=" + v_status_compare ;						
			return  parameter;
		}
		</script>
		<?php
			}
		?>
		</td>
	</tr>
	<?php
	}if ((onegate_is_handler_for_recordtype($v_staff_id,0,$_SESSION["recordtype"]) ) 
		||(onegate_is_permission_update_rate_of_progress_for_recordtype($v_staff_id,0,$_SESSION["recordtype"]))
		||(_is_on_menu(_CONST_ONEGATE_RECORD_VIEW,$_SESSION['onegate_public_function_list'],$_SESSION['onegate_granted_function_list']))
	){?>
	<tr>
		<td class="level1" background="<?php echo $_ISA_IMAGE_URL_PATH; ?>left_menu_button.gif" id="dtk"><a href="<?php echo $_ISA_WEB_SITE_PATH?>record/handle/index.php?fuseaction=DISPLAY_ALL_RECORD_FOR_APPROVING"><?php echo _CONST_LEFT_MENU_RECORD_SUBMIT_SIGN; ?></a>
		
		<?php
			if($is_type ==2){

			$v_detail_status_compare = " And (C_DETAIL_STATUS = 23 or C_DETAIL_STATUS = 30 Or C_DETAIL_STATUS = 40) ";
			$v_status_list = "TRINH_KY";			
			$v_show_date = false;
			$v_receive_date = "";			
			include "../record-lib/qry_all_record_tuyenntt.php";	
		?>
		<script type="text/javascript">		
		function create_paranmeter_thuly_dtk()
		{					
			var parameter = '';	
			type = 'dtk';
			v_staff_id ='<?php echo $v_staff_id;?>';		
			v_recordtype_filter = '<?php echo ($v_recordtype_filter);?>' ;								
			v_receive_date_filter = '<?php echo ($v_receive_date_filter);?>' ;
			v_status_list= '<?php echo ($v_status_list);?>';		
			v_role = '<?php echo ($v_role);?>' ;
			v_status_of_handover = '<?php echo ($v_status_of_handover);?>' ;
			v_status_of_assigning ='<?php echo ($v_status_of_assigning);?>';
			v_status_of_handle_approve = '<?php echo ($v_status_of_handle_approve);?>';
			v_status_of_chaiman_approve ='<?php echo ($vstatus_of_chaiman_approve);?>';
			v_order_clause = '<?php echo ($v_order_clause);?>';		
			v_detail_status_compare = '<?php echo ($v_detail_status_compare);?>' ;
			v_status_compare = '<?php echo ($v_status_compare);?>';				

			 parameter = "receive_date_filter_" + type + "=" + v_receive_date_filter + "&status_list_" + type + "=" + v_status_list + "&role_" + type + "=" + v_role + "&status_of_handover_" + type + "=" + v_status_of_handover + "&status_of_assigning_" + type + "=" + v_status_of_assigning + "&status_of_handle_approve_" + type + "=" + v_status_of_handle_approve +  "&status_of_chaiman_approve_" + type + "=" + v_status_of_chaiman_approve + "&order_clause_" + type + "=" + v_order_clause + "&detail_status_compare_" + type + "=" + v_detail_status_compare+ "&status_compare_" + type + "=" + v_status_compare ;						
			return  parameter;
		}
		</script>
		<?php
		}
		?>
		</td>
	</tr>
	
	<?php
	}if ((onegate_is_handler_for_recordtype($v_staff_id,0,$_SESSION["recordtype"]) ) 
		||(onegate_is_permission_update_rate_of_progress_for_recordtype($v_staff_id,0,$_SESSION["recordtype"]))
		||(_is_on_menu(_CONST_ONEGATE_RECORD_VIEW,$_SESSION['onegate_public_function_list'],$_SESSION['onegate_granted_function_list']))
	){?>
	<tr>
		<td class="level1" background="<?php echo $_ISA_IMAGE_URL_PATH; ?>left_menu_button.gif" id="dgq"><a href="<?php echo $_ISA_WEB_SITE_PATH?>record/handle/index.php?fuseaction=DISPLAY_ALL_RECORD_APPROVED"><?php echo _CONST_LEFT_MENU_RECORD_SOLVE; ?></a>		
		<?php
			if($is_type ==2){				
			$v_detail_status_compare = " And C_DETAIL_STATUS <> 51 ";
			$v_status_list = "CAP_PHEP,TU_CHOI";			
			$v_show_date = false;
			$v_receive_date = "";
			include "../record-lib/qry_all_record_tuyenntt.php";		
		?>
		<script type="text/javascript">		
		function create_paranmeter_thuly_dgq()
		{					
			var parameter = '';	
			type = 'dgq';
			v_staff_id ='<?php echo $v_staff_id;?>';		
			v_recordtype_filter = '<?php echo ($v_recordtype_filter);?>' ;								
			v_receive_date_filter = '<?php echo ($v_receive_date_filter);?>' ;
			v_status_list= '<?php echo ($v_status_list);?>';		
			v_role = '<?php echo ($v_role);?>' ;
			v_status_of_handover = '<?php echo ($v_status_of_handover);?>' ;
			v_status_of_assigning ='<?php echo ($v_status_of_assigning);?>';
			v_status_of_handle_approve = '<?php echo ($v_status_of_handle_approve);?>';
			v_status_of_chaiman_approve ='<?php echo ($vstatus_of_chaiman_approve);?>';
			v_order_clause = '<?php echo ($v_order_clause);?>';		
			v_detail_status_compare = '<?php echo ($v_detail_status_compare);?>' ;
			v_status_compare = '<?php echo ($v_status_compare);?>';				

			 parameter = "receive_date_filter_" + type + "=" + v_receive_date_filter + "&status_list_" + type + "=" + v_status_list + "&role_" + type + "=" + v_role + "&status_of_handover_" + type + "=" + v_status_of_handover + "&status_of_assigning_" + type + "=" + v_status_of_assigning + "&status_of_handle_approve_" + type + "=" + v_status_of_handle_approve +  "&status_of_chaiman_approve_" + type + "=" + v_status_of_chaiman_approve + "&order_clause_" + type + "=" + v_order_clause + "&detail_status_compare_" + type + "=" + v_detail_status_compare+ "&status_compare_" + type + "=" + v_status_compare ;						
			return  parameter;
		}
		</script>
		
		<?php
		}
		?>
		</td>
	</tr><?php
	}if ((onegate_is_tranfer_to_senior_for_recordtype($v_staff_id,0,$_SESSION["recordtype"]) 
			&& (onegate_is_handler_for_recordtype($v_staff_id,0,$_SESSION["recordtype"])
			||(onegate_is_permission_update_rate_of_progress_for_recordtype($v_staff_id,0,$_SESSION["recordtype"]))))
		|| _is_on_menu(_CONST_ONEGATE_RECORD_VIEW,$_SESSION['onegate_public_function_list'],$_SESSION['onegate_granted_function_list'])){?>
	<tr>
		<td class="level1" background="<?php echo $_ISA_IMAGE_URL_PATH; ?>left_menu_button.gif" id="cc">	<a href="<?php echo $_ISA_WEB_SITE_PATH?>record/handle/index.php?fuseaction=DISPLAY_ALL_RECORD_TRANFERED"><?php echo _CONST_LEFT_MENU_RECORD_TRANFERED; ?></a>
		<?php
			if($is_type ==2){
			$v_detail_status_compare = " And C_DETAIL_STATUS = 70 ";
			$v_status_list = "DANG_THU_LY,TRINH_KY";
			$v_show_date = false;
			$v_receive_date = "";
			$v_tranfered = 1;			
			include "../record-lib/qry_all_record_tuyenntt.php";				
		?>
	</td>
	</tr>
	<?php
	}?>

		<script type="text/javascript">		
		function create_paranmeter_thuly_cc()
		{					
			var parameter = '';	
			type = 'cc';
			v_staff_id ='<?php echo $v_staff_id;?>';		
			v_recordtype_filter = '<?php echo ($v_recordtype_filter);?>' ;								
			v_receive_date_filter = '<?php echo ($v_receive_date_filter);?>' ;
			v_status_list= '<?php echo ($v_status_list);?>';		
			v_role = '<?php echo ($v_role);?>' ;
			v_status_of_handover = '<?php echo ($v_status_of_handover);?>' ;
			v_status_of_assigning ='<?php echo ($v_status_of_assigning);?>';
			v_status_of_handle_approve = '<?php echo ($v_status_of_handle_approve);?>';
			v_status_of_chaiman_approve ='<?php echo ($vstatus_of_chaiman_approve);?>';
			v_order_clause = '<?php echo ($v_order_clause);?>';		
			v_detail_status_compare = '<?php echo ($v_detail_status_compare);?>' ;
			v_status_compare = '<?php echo ($v_status_compare);?>';				

			 parameter = "receive_date_filter_" + type + "=" + v_receive_date_filter + "&status_list_" + type + "=" + v_status_list + "&role_" + type + "=" + v_role + "&status_of_handover_" + type + "=" + v_status_of_handover + "&status_of_assigning_" + type + "=" + v_status_of_assigning + "&status_of_handle_approve_" + type + "=" + v_status_of_handle_approve +  "&status_of_chaiman_approve_" + type + "=" + v_status_of_chaiman_approve + "&order_clause_" + type + "=" + v_order_clause + "&detail_status_compare_" + type + "=" + v_detail_status_compare+ "&status_compare_" + type + "=" + v_status_compare ;						
			return  parameter;
		}
		function GetXmlHttpObject_thuly()
		{ 
			 var objXMLHttp=null
			 if (window.XMLHttpRequest)
			 {
				objXMLHttp=new XMLHttpRequest()
		
			 }
			 else if (window.ActiveXObject)
			 {
			   objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")							
		
			 }
			 return objXMLHttp
		}	
		function getAllNumberRecordThuLy() {
			if(finish == true)
			{			
				xmlHttp=GetXmlHttpObject_thuly();
				if (xmlHttp==null)
				  {
					  alert ("Browser does not support HTTP Request")
					  return
				  } 
				  var url='<?php echo ( _get_current_http_and_host().$_ISA_WEB_SITE_PATH
);?>' + "number_record.php?";
				url = url +create_paranmeter_thuly_dtl()+ '&'+ create_paranmeter_thuly_cbs()+ '&'+ create_paranmeter_thuly_dtk()+'&' + create_paranmeter_thuly_dgq()+'&'+ create_paranmeter_thuly_cc()+'&is_granted='+'<?php echo $v_is_granted_view_record;?>'+'&type='+'THU_LY';
		//alert(url);
				xmlHttp.onreadystatechange=onreadystatechangeThuLy; 		
				xmlHttp.open("GET",url,true)
				xmlHttp.send(null)
			}
		}
		function onreadystatechangeThuLy()
		{
			if (xmlHttp.readyState==1)
			{
				finish =false;
			}
			if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{		
				finish = true;				
			  //alert(xmlHttp.responseText);
				xmlDoc=xmlHttp.responseXML;
					if(xmlDoc.getElementsByTagName("v_size_dangThuLy")[0].childNodes[0].nodeValue != 0){
					text ='<a href="<?php echo $_ISA_WEB_SITE_PATH?>record/handle/index.php?fuseaction=DISPLAY_ALL_HANDLING_RECORD"><?php echo _CONST_LEFT_MENU_RECORD_HANDLING; ?></a>'+'('+xmlDoc.getElementsByTagName("v_size_dangThuLy")[0].childNodes[0].nodeValue +')';
					document.getElementById("dtl").innerHTML = text ;
					}
					if(xmlDoc.getElementsByTagName("v_size_choBoSung")[0].childNodes[0].nodeValue != 0){
						choBoSung ='<a href="<?php echo $_ISA_WEB_SITE_PATH?>record/handle/index.php?fuseaction=DISPLAY_ALL_RECORD_FOR_SUPPLYMENT"><?php echo _CONST_LEFT_MENU_RECORD_WAITING; ?></a>	' +'('+ xmlDoc.getElementsByTagName("v_size_choBoSung")[0].childNodes[0].nodeValue +')';
						document.getElementById("cbs").innerHTML = choBoSung ;	
					}	
					if(xmlDoc.getElementsByTagName("v_size_dangTrinhKy")[0].childNodes[0].nodeValue !=0){
						dangTrinhKy = '<a href="<?php echo $_ISA_WEB_SITE_PATH?>record/handle/index.php?fuseaction=DISPLAY_ALL_RECORD_FOR_APPROVING"><?php echo _CONST_LEFT_MENU_RECORD_SUBMIT_SIGN; ?></a>' +'('+ xmlDoc.getElementsByTagName("v_size_dangTrinhKy")[0].childNodes[0].nodeValue +')';
						document.getElementById("dtk").innerHTML = dangTrinhKy ;	
					}
					if(xmlDoc.getElementsByTagName("v_size_daGiaiQuyet")[0].childNodes[0].nodeValue != 0){
					text = '<a href="<?php echo $_ISA_WEB_SITE_PATH?>record/handle/index.php?fuseaction=DISPLAY_ALL_RECORD_APPROVED"><?php echo _CONST_LEFT_MENU_RECORD_SOLVE; ?></a>		' +'('+xmlDoc.getElementsByTagName("v_size_daGiaiQuyet")[0].childNodes[0].nodeValue +')';
					daGiaiQuyet.innerHTML = text ;
					}
					if(xmlDoc.getElementsByTagName("v_size_chuyenCap")[0].childNodes[0].nodeValue != 0){
						chuyenCap = '<a href="<?php echo $_ISA_WEB_SITE_PATH?>record/handle/index.php?fuseaction=DISPLAY_ALL_RECORD_TRANFERED"><?php echo _CONST_LEFT_MENU_RECORD_TRANFERED; ?></a>' +'('+ xmlDoc.getElementsByTagName("v_size_chuyenCap")[0].childNodes[0].nodeValue +')';
						document.getElementById("cc").innerHTML = chuyenCap ;	
					}
			}
		}
		self.setInterval("getAllNumberRecordThuLy()",timeout);
		</script>
		<?php
			}
		?>
		
	<!-- Leav_begin :21/05/08 .Menu phai thong bao thue cua can bo thu ly TLHS-->
	<?php //Leav_begin_14082008:2222222
	 if($v_size_2_phat>0 ||$v_staff_id =='1858'){ ?>
	<tr>
	<td class="level1" background="<?php echo $_ISA_IMAGE_URL_PATH; ?>left_menu_button.gif">
			<a href="<?php echo $_ISA_WEB_SITE_PATH?>record/handle/index.php?fuseaction=DISPLAY_ALL_RECORD_THONG_BAO_PHAT"><?php echo 	      _CONST_LEFT_MENU_RECORD_NOTIFY_PHAT; ?></a>
	  </td>
	</tr>
	<?php } ?>
	<?php  if($v_size_2_thue>0 ||$v_staff_id =='1858'){ ?>
	<tr>
	<td class="level1" background="<?php echo $_ISA_IMAGE_URL_PATH; ?>left_menu_button.gif">
			<a href="<?php echo $_ISA_WEB_SITE_PATH?>record/handle/index.php?fuseaction=DISPLAY_ALL_RECORD_THONG_BAO_THUE"><?php echo 	      _CONST_LEFT_MENU_RECORD_NOTIFY_THUE; ?></a>
	  </td>
	</tr>
	<?php }  //Leav_begin_14082008:2222222?>
	<!--<?php if($v_size_2_khong_phat>0 ||$v_staff_id =='1858'){//Leav_update:24092008 ?>
	<tr>
	<td class="level1" background="<?php echo $_ISA_IMAGE_URL_PATH; ?>left_menu_button.gif">
			<a href="<?php echo $_ISA_WEB_SITE_PATH?>record/handle/index.php?fuseaction=DISPLAY_ALL_RECORD_THONG_BAO_KHONG_PHAT"><?php echo _CONST_LEFT_MENU_RECORD_NOTIFY_NO_PHAT; ?></a>
	  </td>
	</tr>
	<?php }  //Leav_end:24092008?>-->
	<!-- Leav_end :21/05/08-->
	<!--****Them link ho so tranh chap o bo phan thu ly _NgocNTM**********-->
<?php
   	if((_get_item_attr_by_id($_SESSION['arr_all_staff'], $_SESSION['staff_id'], 'unit_id') =='256' )||$v_staff_id =='1858'){
		
	?>
<tr>
	<td class="level1" background="<?php echo $_ISA_IMAGE_URL_PATH; ?>left_menu_button.gif" id ="hstc"><a href="<?php echo $_ISA_WEB_SITE_PATH?>record/handle/index.php?fuseaction=DISPLAY_ALL_RECORD_FOR_DISPUTE"><?php echo 'H&#7891; s&#417; tranh ch&#7845;p '; ?></a>
	</td>
</tr>
<?php	    
		}
		if (_get_item_attr_by_id($_SESSION['arr_all_staff'],$_SESSION['staff_id'],'position_code') == 'LCHS')
		{?>
		<tr><td class="level1" background="<?php echo $_ISA_IMAGE_URL_PATH; ?>left_menu_button.gif" id ="pctl" ><a href="<?php echo $_ISA_WEB_SITE_PATH?>record/handle/index.php?fuseaction=DISPLAY_ALL_SHARING_RECORD"><?php echo _CONST_LEFT_MENU_RECORD_HANDLING_SHARING; ?></a>
	</tr>
	<?php
	}
		
		
		
	//nieuvv--101108--hien thi link cong viec dac biet
	// $_ISA_CURRENT_MODUL_CODE_TUYENNTT
	// $v_staff_id
	// $v_record_filter		
	for($j = 0 ; $j < $v_cout; $j ++)
	{
		for($i = 0 ; $i < $v_count_spec_worktype ; $i ++)
		{			
			if($arr_all_spec_worktype[$i]['C_UPDATE_METHOD_START'] == 'LEFT_MODULE_UPDATE_HANDLE'&& $arr_all_spec_worktype[$i]['FK_WORKTYPE_START'] == $arr_list[$j][0])
			{
				$v_pk_spec_worktype = $arr_all_spec_worktype[$i]['PK_SPEC_WORKTYPE'];
				$v_id_spec_worktype = $arr_all_spec_worktype[$i]['FK_WORKTYPE_START'];
				$v_name_spec_worktype = _getname($arr_list,$arr_all_spec_worktype[$i]['FK_WORKTYPE_START']);
				//echo $v_name_spec_worktype;
				?>
				<tr>
	<td class="level1" background="<?php echo $_ISA_IMAGE_URL_PATH; ?>left_menu_button.gif">
			<a href="<?php echo $_ISA_WEB_SITE_PATH?>record/handle/index.php?fuseaction=DISPLAY_ALL_RECORD_SPEC_WORK&type_spec_dsp=<?php echo $v_pk_spec_worktype;?>"><?php echo  spec_work_show_left_menu_links($_ISA_CURRENT_MODUL_CODE,$v_staff_id,$v_recordtype_filter); ?></a>
	  </td>
	</tr>
				 <?php				 
			}
		}
	}

		
	//the-end-nieuvv-101108--
	?>
<!--***********************End****************************-->


</table>
</div>
<!--Phe duyet ho so-->
<div id="APPROVING" style=".display:none">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="left_menu_table">
	<?php 
	
if(onegate_is_handler_leader_first_time_for_recordtype($v_staff_id,0,$_SESSION["recordtype"])){?>
	<tr> <!-- Phan cong thu ly -->
		<td class="level1" background="<?php echo $_ISA_IMAGE_URL_PATH; ?>left_menu_button.gif" id ="pctl" ><a href="<?php echo $_ISA_WEB_SITE_PATH?>record/approving/index.php?fuseaction=DISPLAY_ALL_SHARING_RECORD"><?php echo _CONST_LEFT_MENU_RECORD_HANDLING_SHARING; ?></a>
		<?php
		if($is_type ==3){
			$_ISA_CURRENT_MODUL_CODE_TUYENNTT = "APPROVING";
			$v_detail_status_compare = " And C_DETAIL_STATUS = 10 ";
			$v_status_list = "DANG_THU_LY";		
			$v_show_date = false;
			$v_receive_date = "";
			include "../record-lib/qry_all_record_tuyenntt.php";			
		?>		
		<script type="text/javascript">
		function create_paranmeter_pheduyet_pc()
			{
				//alert(type);
				var parameter = '';
				type= 'pc';
					v_staff_id ='<?php echo $v_staff_id;?>';		
					v_recordtype_filter = '<?php echo ($v_recordtype_filter);?>' ;								
					v_receive_date_filter = '<?php echo ($v_receive_date_filter);?>' ;
					v_status_list= '<?php echo ($v_status_list);?>';		
					v_role = '<?php echo ($v_role);?>' ;
					v_status_of_handover = '<?php echo ($v_status_of_handover);?>' ;
					v_status_of_assigning ='<?php echo ($v_status_of_assigning);?>';
					v_status_of_handle_approve = '<?php echo ($v_status_of_handle_approve);?>';
					v_status_of_chaiman_approve ='<?php echo ($vstatus_of_chaiman_approve);?>';
					v_order_clause = '<?php echo ($v_order_clause);?>';		
					v_detail_status_compare = '<?php echo ($v_detail_status_compare);?>' ;
					v_status_compare = '<?php echo ($v_status_compare);?>';					
			
					 parameter = "staff_id_" + type + "=" + v_staff_id + "&recordtype_filter_" + type + "=" + v_recordtype_filter + "&receive_date_filter_" + type + "=" + v_receive_date_filter + "&status_list_" + type + "=" + v_status_list + "&role_" + type + "=" + v_role + "&status_of_handover_" + type + "=" + v_status_of_handover + "&status_of_assigning_" + type + "=" + v_status_of_assigning + "&status_of_handle_approve_" + type + "=" + v_status_of_handle_approve +  "&status_of_chaiman_approve_" + type + "=" + v_status_of_chaiman_approve + "&order_clause_" + type + "=" + v_order_clause + "&detail_status_compare_" + type + "=" + v_detail_status_compare+ "&status_compare_" + type + "=" + v_status_compare ;		
				return  parameter;
			}
			</script>
		<?php
		}?>
		</td>
	</tr>
	<tr>
		<td class="level1" background="<?php echo $_ISA_IMAGE_URL_PATH; ?>left_menu_button.gif" id ="tdtl"><a href="<?php echo $_ISA_WEB_SITE_PATH?>record/approving/index.php?fuseaction=DISPLAY_ALL_SHARING_RECORD_CHANGLE"><?php echo _CONST_LEFT_MENU_RECORD_HANDLING_SHARING_CHANGLE; ?></a>
		<?php
			if($is_type ==3){
			$v_detail_status_compare = "112,11,21,31";
			$v_status_list = "DANG_THU_LY";
			$v_show_date = false;
			$v_receive_date = "";			
			include "../record-lib/qry_all_record_tuyenntt.php";			
		?>
			<script type="text/javascript">
		function create_paranmeter_pheduyet_td()
			{
				var parameter = '';
				type= 'td';
				v_staff_id ='<?php echo $v_staff_id;?>';		
				v_recordtype_filter = '<?php echo ($v_recordtype_filter);?>' ;								
				v_receive_date_filter = '<?php echo ($v_receive_date_filter);?>' ;
				v_status_list= '<?php echo ($v_status_list);?>';		
				v_role = '<?php echo ($v_role);?>' ;
				v_status_of_handover = '<?php echo ($v_status_of_handover);?>' ;
				v_status_of_assigning ='<?php echo ($v_status_of_assigning);?>';
				v_status_of_handle_approve = '<?php echo ($v_status_of_handle_approve);?>';
				v_status_of_chaiman_approve ='<?php echo ($vstatus_of_chaiman_approve);?>';
				v_order_clause = '<?php echo ($v_order_clause);?>';		
				v_detail_status_compare = '<?php echo ($v_detail_status_compare);?>' ;
				v_status_compare = '<?php echo ($v_status_compare);?>';				
					
				 parameter = "receive_date_filter_" + type + "=" + v_receive_date_filter + "&status_list_" + type + "=" + v_status_list + "&role_" + type + "=" + v_role + "&status_of_handover_" + type + "=" + v_status_of_handover + "&status_of_assigning_" + type + "=" + v_status_of_assigning + "&status_of_handle_approve_" + type + "=" + v_status_of_handle_approve +  "&status_of_chaiman_approve_" + type + "=" + v_status_of_chaiman_approve + "&order_clause_" + type + "=" + v_order_clause + "&detail_status_compare_" + type + "=" + v_detail_status_compare+ "&status_compare_" + type + "=" + v_status_compare ;				
				return  parameter;
			}
			</script>	
		<?php
			}
		?>
		</td>
	</tr><?php
	}if ((onegate_is_handler_leader_for_recordtype($v_staff_id,0,$_SESSION["recordtype"]))
		||(onegate_is_approve_leader_for_recordtype($v_staff_id,0,$_SESSION["recordtype"]))
		||(onegate_is_handler_leader_first_time_for_recordtype($v_staff_id,0,$_SESSION["recordtype"]))
		) {?>
	<tr>
		<td class="level1" background="<?php echo $_ISA_IMAGE_URL_PATH; ?>left_menu_button.gif" id="cd_pheduyet"><a href="<?php echo $_ISA_WEB_SITE_PATH?>record/approving/index.php?fuseaction=DISPLAY_ALL_RECORD_FOR_APPROVING"><?php echo _CONST_LEFT_MENU_RECORD_FOR_APPROVE; ?></a>
		<?php
		if($is_type ==3){
		$v_detail_status_compare = "";
		$v_status_list = "TRINH_KY";
		$v_show_date = false;
		$v_receive_date = "";		
		include "../record-lib/qry_all_record_tuyenntt.php";			
		?>
		<script type="text/javascript">
		function create_paranmeter_pheduyet_cd()
			{
				var parameter = '';
				type= 'cd';
				v_staff_id ='<?php echo $v_staff_id;?>';		
				v_recordtype_filter = '<?php echo ($v_recordtype_filter);?>' ;								
				v_receive_date_filter = '<?php echo ($v_receive_date_filter);?>' ;
				v_status_list= '<?php echo ($v_status_list);?>';		
				v_role = '<?php echo ($v_role);?>' ;
				v_status_of_handover = '<?php echo ($v_status_of_handover);?>' ;
				v_status_of_assigning ='<?php echo ($v_status_of_assigning);?>';
				v_status_of_handle_approve = '<?php echo ($v_status_of_handle_approve);?>';
				v_status_of_chaiman_approve ='<?php echo ($vstatus_of_chaiman_approve);?>';
				v_order_clause = '<?php echo ($v_order_clause);?>';		
				v_detail_status_compare = '<?php echo ($v_detail_status_compare);?>' ;
				v_status_compare = '<?php echo ($v_status_compare);?>';				
					
				 parameter = "receive_date_filter_" + type + "=" + v_receive_date_filter + "&status_list_" + type + "=" + v_status_list + "&role_" + type + "=" + v_role + "&status_of_handover_" + type + "=" + v_status_of_handover + "&status_of_assigning_" + type + "=" + v_status_of_assigning + "&status_of_handle_approve_" + type + "=" + v_status_of_handle_approve +  "&status_of_chaiman_approve_" + type + "=" + v_status_of_chaiman_approve + "&order_clause_" + type + "=" + v_order_clause + "&detail_status_compare_" + type + "=" + v_detail_status_compare+ "&status_compare_" + type + "=" + v_status_compare ;				
				return  parameter;
			}
			</script>	
		<?php
		}
		?>
		</td>
	</tr><?php
	}if ((onegate_is_handler_leader_for_recordtype($v_staff_id,0,$_SESSION["recordtype"]))
		||(onegate_is_approve_leader_for_recordtype($v_staff_id,0,$_SESSION["recordtype"]))
		||(onegate_is_handler_leader_first_time_for_recordtype($v_staff_id,0,$_SESSION["recordtype"]))
		) {?>
	<tr>
		<td class="level1" background="<?php echo $_ISA_IMAGE_URL_PATH; ?>left_menu_button.gif" id ="dd_pheduyet"><a href="<?php echo $_ISA_WEB_SITE_PATH?>record/approving/index.php?fuseaction=DISPLAY_ALL_RECORD_APPROVED"><?php echo _CONST_LEFT_MENU_RECORD_APPROVED; ?></a>
		<?php
		if($is_type ==3){
		$v_detail_status_compare = " And C_DETAIL_STATUS <> 51 ";
		$v_status_list = "CAP_PHEP,TU_CHOI";
		$v_show_date = false;
		$v_receive_date = "";	
		include "../record-lib/qry_all_record_tuyenntt.php";				
		?>
		<script type="text/javascript">
		function create_paranmeter_pheduyet_dd()
			{
				var parameter = '';
				type= 'dd';
				v_staff_id ='<?php echo $v_staff_id;?>';		
				v_recordtype_filter = '<?php echo ($v_recordtype_filter);?>' ;								
				v_receive_date_filter = '<?php echo ($v_receive_date_filter);?>' ;
				v_status_list= "<?php echo ($v_status_list);?>";		
				v_role = '<?php echo ($v_role);?>' ;
				v_status_of_handover = '<?php echo ($v_status_of_handover);?>' ;
				v_status_of_assigning ='<?php echo ($v_status_of_assigning);?>';
				v_status_of_handle_approve = '<?php echo ($v_status_of_handle_approve);?>';
				v_status_of_chaiman_approve ='<?php echo ($vstatus_of_chaiman_approve);?>';
				v_order_clause = '<?php echo ($v_order_clause);?>';		
				v_detail_status_compare = '<?php echo ($v_detail_status_compare);?>' ;
				v_status_compare = '<?php echo ($v_status_compare);?>';				
					
				 parameter = "receive_date_filter_" + type + "=" + v_receive_date_filter + "&status_list_" + type + "=" + v_status_list + "&role_" + type + "=" + v_role + "&status_of_handover_" + type + "=" + v_status_of_handover + "&status_of_assigning_" + type + "=" + v_status_of_assigning + "&status_of_handle_approve_" + type + "=" + v_status_of_handle_approve +  "&status_of_chaiman_approve_" + type + "=" + v_status_of_chaiman_approve + "&order_clause_" + type + "=" + v_order_clause + "&detail_status_compare_" + type + "=" + v_detail_status_compare+ "&status_compare_" + type + "=" + v_status_compare ;				
				return  parameter;
			}
			</script>	
		<?php
		}
		?>
		</td>
	</tr><?php
	}if ((onegate_is_handler_leader_for_recordtype($v_staff_id,0,$_SESSION["recordtype"]))
		||(onegate_is_approve_leader_for_recordtype($v_staff_id,0,$_SESSION["recordtype"]))
		||(onegate_is_handler_leader_first_time_for_recordtype($v_staff_id,0,$_SESSION["recordtype"]))) {?>
	<tr>
		<td class="level1" background="<?php echo $_ISA_IMAGE_URL_PATH; ?>left_menu_button.gif" id ="thgq"><a href="<?php echo $_ISA_WEB_SITE_PATH?>record/approving/index.php?fuseaction=DISPLAY_ALL_HANDLING_RECORD"><?php echo _CONST_LEFT_MENU_RECORD_SITUATION; ?></a>
		<?php
		if($is_type ==3){
		$v_detail_status_compare = " And C_DETAIL_STATUS <> 20 ";
		$v_status_list = "DANG_THU_LY";
		$v_show_date = false;
		$v_receive_date = "";		
		include "../record-lib/qry_all_record_tuyenntt.php";	
		?>
		<script type="text/javascript">
		function create_paranmeter_pheduyet_th()
			{
				var parameter = '';
				type= 'th';
				v_staff_id ='<?php echo $v_staff_id;?>';		
				v_recordtype_filter = '<?php echo ($v_recordtype_filter);?>' ;								
				v_receive_date_filter = '<?php echo ($v_receive_date_filter);?>' ;
				v_status_list= '<?php echo ($v_status_list);?>';		
				v_role = '<?php echo ($v_role);?>' ;
				v_status_of_handover = '<?php echo ($v_status_of_handover);?>' ;
				v_status_of_assigning ='<?php echo ($v_status_of_assigning);?>';
				v_status_of_handle_approve = '<?php echo ($v_status_of_handle_approve);?>';
				v_status_of_chaiman_approve ='<?php echo ($vstatus_of_chaiman_approve);?>';
				v_order_clause = '<?php echo ($v_order_clause);?>';		
				v_detail_status_compare = '<?php echo ($v_detail_status_compare);?>' ;
				v_status_compare = '<?php echo ($v_status_compare);?>';				
					
				 parameter = "receive_date_filter_" + type + "=" + v_receive_date_filter + "&status_list_" + type + "=" + v_status_list + "&role_" + type + "=" + v_role + "&status_of_handover_" + type + "=" + v_status_of_handover + "&status_of_assigning_" + type + "=" + v_status_of_assigning + "&status_of_handle_approve_" + type + "=" + v_status_of_handle_approve +  "&status_of_chaiman_approve_" + type + "=" + v_status_of_chaiman_approve + "&order_clause_" + type + "=" + v_order_clause + "&detail_status_compare_" + type + "=" + v_detail_status_compare+ "&status_compare_" + type + "=" + v_status_compare ;				
				return  parameter;
			}
		function getAllNumberRecordPheDuyet() {
			if(finish == true)
			{
				xmlHttp=GetXmlHttpObject();
				if (xmlHttp==null)
				  {
					  alert ("Browser does not support HTTP Request")
					  return
				  } 
				 var url='<?php echo ( _get_current_http_and_host().$_ISA_WEB_SITE_PATH
);?>' + "number_record.php?";
				url = url + create_paranmeter_pheduyet_pc()+ '&' + create_paranmeter_pheduyet_td() + '&'+ create_paranmeter_pheduyet_cd()+ '&'+ create_paranmeter_pheduyet_dd()+'&'+ create_paranmeter_pheduyet_th()+'&is_granted='+'<?php echo $v_is_granted_view_record;?>'+'&type='+'PHE_DUYET';	
				//alert(url);
				xmlHttp.onreadystatechange=onreadystatechangePheDuyet; 	
				xmlHttp.open("GET",url,true);
				xmlHttp.send(url);
			}
		}
		function onreadystatechangePheDuyet()
		{
			finish =false;
			if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{			
			//	alert(xmlHttp.responseText);
				xmlDoc=xmlHttp.responseXML;
				finish =true;
				if(xmlDoc.getElementsByTagName("v_size_phanCongThuLy")[0].childNodes[0].nodeValue !=0)
				{
					text ='<a href="<?php echo $_ISA_WEB_SITE_PATH?>record/approving/index.php?fuseaction=DISPLAY_ALL_SHARING_RECORD"><?php echo _CONST_LEFT_MENU_RECORD_HANDLING_SHARING; ?></a>' +'('+xmlDoc.getElementsByTagName("v_size_phanCongThuLy")[0].childNodes[0].nodeValue +')';
					document.getElementById("pctl").innerHTML = text ;
				}
				if(xmlDoc.getElementsByTagName("v_size_thayDoiThuLy")[0].childNodes[0].nodeValue != 0)
				{
						thayDoiThuLy ='<a href="<?php echo $_ISA_WEB_SITE_PATH?>record/approving/index.php?fuseaction=DISPLAY_ALL_SHARING_RECORD_CHANGLE"><?php echo _CONST_LEFT_MENU_RECORD_HANDLING_SHARING_CHANGLE; ?></a>' +'('+ xmlDoc.getElementsByTagName("v_size_thayDoiThuLy")[0].childNodes[0].nodeValue +')';
						 document.getElementById("tdtl").innerHTML = thayDoiThuLy ;	
				}	
				if(xmlDoc.getElementsByTagName("v_size_choDuyet")[0].childNodes[0].nodeValue!=0)
				{
					choDuyet = '<a href="<?php echo $_ISA_WEB_SITE_PATH?>record/approving/index.php?fuseaction=DISPLAY_ALL_RECORD_FOR_APPROVING"><?php echo _CONST_LEFT_MENU_RECORD_FOR_APPROVE; ?></a>' +'('+ xmlDoc.getElementsByTagName("v_size_choDuyet")[0].childNodes[0].nodeValue +')';
					document.getElementById("cd_pheduyet").innerHTML = choDuyet ;	
				}
				if(xmlDoc.getElementsByTagName("v_size_daDuyet")[0].childNodes[0].nodeValue!= 0)
				{
					text ='	<a href="<?php echo $_ISA_WEB_SITE_PATH?>record/approving/index.php?fuseaction=DISPLAY_ALL_RECORD_APPROVED"><?php echo _CONST_LEFT_MENU_RECORD_APPROVED; ?></a>' +'('+xmlDoc.getElementsByTagName("v_size_daDuyet")[0].childNodes[0].nodeValue +')';
					document.getElementById("dd_pheduyet").innerHTML = text ;
				}
				if(xmlDoc.getElementsByTagName("v_size_tinhHinhGiaiQuyet")[0].childNodes[0].nodeValue != 0)
				{
					chuyenCap = '<a href="<?php echo $_ISA_WEB_SITE_PATH?>record/approving/index.php?fuseaction=DISPLAY_ALL_HANDLING_RECORD"><?php echo _CONST_LEFT_MENU_RECORD_SITUATION; ?></a>' +'('+ xmlDoc.getElementsByTagName("v_size_tinhHinhGiaiQuyet")[0].childNodes[0].nodeValue +')';
					document.getElementById("thgq").innerHTML = chuyenCap ;	
				}	
			}
		}
		self.setInterval("getAllNumberRecordPheDuyet()",timeout);
		</script>
		<?php
				}
		?>
		</td>
	</tr>
	<!-- Them 2 Link :Leav _begin 05/06/2008 :Phe duyet HS
	-Ho so thong bao phat.
	-Ho so thong bao thue.
	-->
	<?php 
		 //Leav_begin_14082008:33333
		global $v_size_2_phat; 
	if($v_size_2_phat>0 ||$v_staff_id =='1858'){  ?>
	<tr>
	<!-- Link:Thong bao phat-->
		<td class="level1" background="<?php echo $_ISA_IMAGE_URL_PATH; ?>left_menu_button.gif" id ="thgq"><a href="<?php echo $_ISA_WEB_SITE_PATH?>record/approving/index.php?fuseaction=DISPLAY_ALL_WATING_NOTIFY_PUNISH"><?php echo _CONST_LEFT_MENU_APPROVE_PUNISH; ?></a>
		</td>
	</tr>
	<?php } ?>
	<?php if($v_size_2_thue>0 ||$v_staff_id =='1858'){  ?>
	<tr>
	<!-- Link:Thong bao thue-->
		<td class="level1" background="<?php echo $_ISA_IMAGE_URL_PATH; ?>left_menu_button.gif" id ="thgq"><a href="<?php echo $_ISA_WEB_SITE_PATH?>record/approving/index.php?fuseaction=DISPLAY_ALL_WATING_NOTIFY_TAX"><?php echo _CONST_LEFT_MENU_APPROVE_TAX; ?></a>
		</td>
	</tr>
	<?php } //Leav_begin_14082008:33333?>
	<?php if($v_size_2_khong_phat>0 ||$v_staff_id =='1858'){  ?>
	<tr>
	<!-- Link:Thong bao thue-->
		<td class="level1" background="<?php echo $_ISA_IMAGE_URL_PATH; ?>left_menu_button.gif" id ="thgq"><a href="<?php echo $_ISA_WEB_SITE_PATH?>record/approving/index.php?fuseaction=DISPLAY_ALL_WATING_NO_NOTIFY_PUBNISH"><?php echo _CONST_LEFT_MENU_APPROVE_NO_PUNISH; ?></a>
		</td>
	</tr>
	<?php } ?>
		<!-- Them 2 Link :Leav _begin 05/06/2008 -->
<!--****Them link ho so tranh chap o bo phan phe duyet_NgocNTM**********-->
<?php
	}
	
	 if((_get_item_attr_by_id($_SESSION['arr_all_staff'], $_SESSION['staff_id'], 'unit_id') =='256' )||$v_staff_id =='1858'){
	?>
<tr>
	<td class="level1" background="<?php echo $_ISA_IMAGE_URL_PATH; ?>left_menu_button.gif" id ="hstc"><a href="<?php echo $_ISA_WEB_SITE_PATH?>record/approving/index.php?fuseaction=DISPLAY_ALL_RECORD_FOR_DISPUTE"><?php echo _CONST_DISPUTE_APPROVING; ?></a>
	</td>
</tr>
<?php	}	

//nieuvv--101108--hien thi link cong viec dac biet
	// $_ISA_CURRENT_MODUL_CODE_TUYENNTT
	// $v_staff_id
	// $v_record_filter		
	for($j = 0 ; $j < $v_cout; $j ++)
	{
		for($i = 0 ; $i < $v_count_spec_worktype ; $i ++)
		{			
			if($arr_all_spec_worktype[$i]['C_UPDATE_METHOD_START'] == 'LEFT_MODULE_UPDATE_APPROVE'&& $arr_all_spec_worktype[$i]['FK_WORKTYPE_START'] == $arr_list[$j][0])
			{
				$v_pk_spec_worktype = $arr_all_spec_worktype[$i]['PK_SPEC_WORKTYPE'];
				$v_id_spec_worktype = $arr_all_spec_worktype[$i]['FK_WORKTYPE_START'];
				$v_name_spec_worktype = _getname($arr_list,$arr_all_spec_worktype[$i]['FK_WORKTYPE_START']);
				//echo $v_name_spec_worktype;
				?>
				<tr>
	<td class="level1" background="<?php echo $_ISA_IMAGE_URL_PATH; ?>left_menu_button.gif">
			<a href="<?php echo $_ISA_WEB_SITE_PATH?>record/approving/index.php?fuseaction=DISPLAY_ALL_RECORD_SPEC_WORK&type_spec_dsp=<?php echo $v_pk_spec_worktype;?>"><?php echo  spec_work_show_left_menu_links($_ISA_CURRENT_MODUL_CODE,$v_staff_id,$v_recordtype_filter); ?></a>
	  </td>
	</tr>
				 <?php				 
			}
		}
	}

		
	//the-end-nieuvv-101108--
	?>
<!--***************************************************-->
	
</table>
</div>
<!--Tra cuu ho so luu-->
<div id="ARCHIVES" style=".display:none">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="left_menu_table">
</table>
</div>
<!--Bao cao-->
<div id="REPORT" style=".display:none">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="left_menu_table">
</table>
</div>
<div id="QA">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="left_menu_table">
	<tr>
		<td class="level1" background="<?php echo $_ISA_IMAGE_URL_PATH; ?>left_menu_button.gif">
			<a href="<?php echo $_ISA_WEB_SITE_PATH?>qa/index.php"><?php echo _CONST_LEFT_MENU_QA_VIEW; ?></a>
		</td>
	</tr>
<?php if (_is_on_menu(_CONST_LIST_ANSWERER_QA,$_SESSION['onegate_public_modul_list'],$_SESSION['onegate_granted_modul_list'])){?>
	<!---Danh muc nguoi tra loi cau hoi----->
	<tr  style="display:block ">
		<td class="level1" background="<?php echo $_ISA_IMAGE_URL_PATH; ?>left_menu_button.gif">
			<a href="<?php echo $_ISA_WEB_SITE_PATH?>list/answerer-qa/index.php"><?php echo _CONST_LEFT_MENU_LIST_ANSWERER_QA; ?></a>
		</td>
	</tr><?php
}
if (_is_on_menu(_CONST_LIST_APPROVER_QA,$_SESSION['onegate_public_modul_list'],$_SESSION['onegate_granted_modul_list'])){?>
	<!---Danh muc nguoi duyet cau hoi----->
	<tr  style="display:block ">
		<td class="level1" background="<?php echo $_ISA_IMAGE_URL_PATH; ?>left_menu_button.gif">
			<a href="<?php echo $_ISA_WEB_SITE_PATH?>list/approver-qa/index.php"><?php echo _CONST_LEFT_MENU_LIST_APPROVER_QA; ?></a>
		</td>
	</tr><?php
}?>
</table>
</div>
<div id="AF" style=".display:none">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="left_menu_table">
	<!--tr>
		<td class="level1" background="<?php echo $_ISA_IMAGE_URL_PATH; ?>left_menu_button.gif">
			<a href="<?php echo $_ISA_WEB_SITE_PATH?>af/index.php?fuseaction=DISPLAY_SINGLE_AF"><?php echo _CONST_LEFT_MENU_AF_ADD; ?></a>
		</td>
	</tr>
	<tr>
		<td class="level1" background="<?php echo $_ISA_IMAGE_URL_PATH; ?>left_menu_button.gif">
			<a href="<?php echo $_ISA_WEB_SITE_PATH?>af/index.php?fuseaction=DISPLAY_ALL_AF"><?php echo _CONST_LEFT_MENU_AF_VIEW; ?></a>
		</td>
	</tr-->
</table>
</div>
<div id="LIST" style=".display:none">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="left_menu_table">
	<!--Tao lap danh muc linh vuc--><?php
	if (_is_on_menu(_CONST_LIST_CATE,$_SESSION['onegate_public_modul_list'],$_SESSION['onegate_granted_modul_list'])){?>
		<tr>
			<td class="level1" background="<?php echo $_ISA_IMAGE_URL_PATH; ?>left_menu_button.gif">
				<a href="<?php echo $_ISA_WEB_SITE_PATH?>list/cate/index.php?fuseaction=DISPLAY_ALL_CATE"><?php echo _CONST_LEFT_MENU_LIST_CATE; ?></a>
			</td>
		</tr><?php
	}
	if (_is_on_menu(_CONST_ONEGATE_LISTTYPE,$_SESSION['onegate_public_modul_list'],$_SESSION['onegate_granted_modul_list'])){?>
		<!---Danh sach cac loai danh muc lien quan den ho so TTHC----->
		<tr>
			<td class="level1" background="<?php echo $_ISA_IMAGE_URL_PATH; ?>left_menu_button.gif">
				<a href="<?php echo $_ISA_WEB_SITE_PATH?>list/listtype/index.php"><?php echo _CONST_LEFT_MENU_LISTTYPE; ?></a>
			</td>
		</tr><?php
	}
	if (_is_on_menu(_CONST_ONEGATE_LIST,$_SESSION['onegate_public_modul_list'],$_SESSION['onegate_granted_modul_list'])){?>
		<!---Danh sach cac doi tuong cua 1 loai danh muc lien quan den ho so TTHC----->
		<tr>
			<td class="level1" background="<?php echo $_ISA_IMAGE_URL_PATH; ?>left_menu_button.gif">
				<a href="<?php echo $_ISA_WEB_SITE_PATH?>list/list/index.php"><?php echo _CONST_LEFT_MENU_LIST; ?></a>
			</td>
		</tr><?php
	}
	if (_is_on_menu(_CONST_ONEGATE_RECORDTYPE,$_SESSION['onegate_public_modul_list'],$_SESSION['onegate_granted_modul_list'])){?>
		<!---Danh sach cac loai ho so TTHC----->
		<tr>
			<td class="level1" background="<?php echo $_ISA_IMAGE_URL_PATH; ?>left_menu_button.gif">
				<a href="<?php echo $_ISA_WEB_SITE_PATH?>list/recordtype/index.php"><?php echo _CONST_LEFT_MENU_RECORDTYPE; ?></a>
			</td>
		</tr><?php
	}
	if (_is_on_menu(_CONST_ONEGATE_WORKTYPE,$_SESSION['onegate_public_modul_list'],$_SESSION['onegate_granted_modul_list'])){?>
		<!---Danh sach loai cong viec ho so TTHC----->
		<tr>
			<td class="level1" background="<?php echo $_ISA_IMAGE_URL_PATH; ?>left_menu_button.gif">
				<a href="<?php echo $_ISA_WEB_SITE_PATH?>list/worktype/index.php"><?php echo _CONST_LEFT_MENU_WORKTYPE; ?></a>
			</td>
		</tr><?php
	}
	//nieuvv--061108--danh muc cong viec dat biet
	if (_is_on_menu(_CONST_ONEGATE_WORKTYPE,$_SESSION['onegate_public_modul_list'],$_SESSION['onegate_granted_modul_list'])){?>
		<!---Danh sach loai cong viec ho so TTHC----->
		<tr>
			<td class="level1" background="<?php echo $_ISA_IMAGE_URL_PATH; ?>left_menu_button.gif">
				<a href="<?php echo $_ISA_WEB_SITE_PATH?>list/worktype_spec/index.php"><?php echo _CONST_LEFT_MENU_WORKTYPE_SPEC; ?></a>
			</td>
		</tr><?php
	}
	//the-end-nieuvv-061108---
	if (_is_on_menu(_CONST_ONEGATE_REPORTTYPE,$_SESSION['onegate_public_modul_list'],$_SESSION['onegate_granted_modul_list'])){?>
		<!---Danh sach loai bao cao----->
		<tr>
			<td class="level1" background="<?php echo $_ISA_IMAGE_URL_PATH; ?>left_menu_button.gif">
				<a href="<?php echo $_ISA_WEB_SITE_PATH?>list/report/index.php"><?php echo _CONST_LEFT_MENU_REPORT_TYPE; ?></a>
			</td>
		</tr><?php
	}
	if (_is_on_menu(_CONST_LIST_AGENCY,$_SESSION['onegate_public_modul_list'],$_SESSION['onegate_granted_modul_list'])){?>
		<!---Danh muc co quan hanh chinh----->
		<tr>
			<td class="level1" background="<?php echo $_ISA_IMAGE_URL_PATH; ?>left_menu_button.gif">
				<a href="<?php echo $_ISA_WEB_SITE_PATH?>list/agency/index.php"><?php echo _CONST_LEFT_MENU_LIST_AGENCY; ?></a>
			</td>
		</tr><?php
	}
	if (_is_on_menu(_CONST_ONEGATE_LISTTYPE,$_SESSION['onegate_public_modul_list'],$_SESSION['onegate_granted_modul_list'])){?>
		<!---Danh sach cac loai thong tin danh muc su dung XML----->
		<tr  style="display:none ">
			<td class="level1" background="<?php echo $_ISA_IMAGE_URL_PATH; ?>left_menu_button.gif">
				<a href="<?php echo $_ISA_WEB_SITE_PATH?>listxml/listtype/index.php"><?php echo _CONST_LEFT_MENU_LISTTYPE_XML; ?></a>
			</td>
		</tr><?php
	}
	if (_is_on_menu(_CONST_ONEGATE_LIST,$_SESSION['onegate_public_modul_list'],$_SESSION['onegate_granted_modul_list'])){?>
		<!---Danh sach cac doi tuong cua 1 loai danh muc su dung XML----->
		<tr  style="display:none ">
			<td class="level1" background="<?php echo $_ISA_IMAGE_URL_PATH; ?>left_menu_button.gif">
				<a href="<?php echo $_ISA_WEB_SITE_PATH?>listxml/list/index.php"><?php echo _CONST_LEFT_MENU_LIST_XML; ?></a>
			</td>
		</tr><?php
	}

	if (_is_on_menu(_CONST_LIST_CREATOR_AF,$_SESSION['onegate_public_modul_list'],$_SESSION['onegate_granted_modul_list'])){?>
		<!---Danh muc nguoi tao lap TTHC----->
		<tr  style="display:none ">
			<td class="level1" background="<?php echo $_ISA_IMAGE_URL_PATH; ?>left_menu_button.gif">
				<a href="<?php echo $_ISA_WEB_SITE_PATH?>list/creator-af/index.php"><?php echo _CONST_LEFT_MENU_LIST_CREATOR_AF; ?></a>
			</td>
		</tr><?php
	}
	if (_is_on_menu(_CONST_LIST_APPROVER_AF,$_SESSION['onegate_public_modul_list'],$_SESSION['onegate_granted_modul_list'])){?>
		<!---Danh muc nguoi duyet TTHC---->
		<tr  style="display:none ">
			<td class="level1" background="<?php echo $_ISA_IMAGE_URL_PATH; ?>left_menu_button.gif">
				<a href="<?php echo $_ISA_WEB_SITE_PATH?>list/approver-af/index.php"><?php echo _CONST_LEFT_MENU_LIST_APPROVER_AF; ?></a>
			</td>
		</tr><?php 
	}
	if (_is_on_menu(_CONST_ONEGATE_CITIZEN,$_SESSION['onegate_public_modul_list'],$_SESSION['onegate_granted_modul_list'])){?>
		<!---Quan tri tai khoan cong dan---->
		<tr>
			<td class="level1" background="<?php echo $_ISA_IMAGE_URL_PATH; ?>left_menu_button.gif">
				<a href="<?php echo $_ISA_WEB_SITE_PATH?>list/citizen/index.php"><?php echo _CONST_LEFT_MENU_CITTIZEN; ?></a>
			</td>
		</tr><?php 
	}?>
</table>
</div>

<!-- Thong tin dang nhap -->
<div id="LOGIN" style=".display:none">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="left_menu_table">
		
		<tr>
			<td class="level1" background="<?php echo $_ISA_IMAGE_URL_PATH; ?>left_menu_button.gif">
				<a href="<?php echo $_ISA_WEB_SITE_PATH;?>logininfo/index.php" ><?php echo _CONST_LEFT_MENU_LOGIN_USER; ?></a>
			</td>
		</tr>
		
		<!--<tr>
			<td class="level1" background="<?php echo $_ISA_IMAGE_URL_PATH; ?>left_menu_button.gif">
				<a href="<?php echo $_ISA_USER_WEB_SITE_PATH;?>logininfo/index.php?fuseaction=ip" ><?php echo _CONST_LEFT_MENU_LOGIN_IP; ?></a>
			</td>
		</tr>-->
		<tr>
			<td class="level1" background="<?php echo $_ISA_IMAGE_URL_PATH; ?>left_menu_button.gif">
				<a href="<?php echo $_ISA_WEB_SITE_PATH;?>logininfo/index.php?fuseaction=date" ><?php echo _CONST_LEFT_MENU_LOGIN_DATE; ?></a>
			</td>
		</tr>
</table>
</div>

<!-- Thong tin he thong -->
<div id="SYSTEM" style=".display:none">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="left_menu_table">
		<tr>
			<td class="level1" background="<?php echo $_ISA_IMAGE_URL_PATH; ?>left_menu_button.gif">
				<a href="<?php echo $_ISA_WEB_SITE_PATH;?>replication/index.php" ><?php echo _CONST_TOP_MENU_REPLICATION; ?></a>
			</td>
		</tr>
		<tr>
			<td class="level1" background="<?php echo $_ISA_IMAGE_URL_PATH; ?>left_menu_button.gif">
				<a href="<?php echo $_ISA_USER_WEB_SITE_PATH;?>application/index.php" ><?php echo _CONST_TOP_MENU_ONEGATE_USER; ?></a>
			</td>
		</tr>
</table>
</div>
<table>
	<tr><?php
		if(isset($_SESSION['user_name'])){?>
			<td align="left" class="logged_user" ><?php echo _show_info_by_enduser(); ?></td><?php
		}
		?>
	</tr>
</table>
<script>
	<?php
		
	if ($_ISA_CURRENT_MODUL_CODE == "APPROVING_NET"){ ?>
		document.all.APPROVING_NET.style.display = "block";
		document.all.td_approving_net.className="visited";<?php
	}else{
	?>
		document.all.APPROVING_NET.style.display = "none";<?php
	}	
	if ($_ISA_CURRENT_MODUL_CODE == "RECEIVE_RESULT"){ ?>
		document.all.RECEIVE_RESULT.style.display = "block";
		document.all.td_receive_result.className="visited";<?php
	}else{?>
		document.all.RECEIVE_RESULT.style.display = "none";<?php
	}
	if ($_ISA_CURRENT_MODUL_CODE == "HANDLE"){ ?>
		document.all.HANDLE.style.display = "block";
		document.all.td_handle.className="visited";<?php
	}else{?>
		document.all.HANDLE.style.display = "none";<?php
	}
	if ($_ISA_CURRENT_MODUL_CODE == "APPROVING"){ ?>
		document.all.APPROVING.style.display = "block";
		document.all.td_approve.className="visited";<?php
	}else{?>
		document.all.APPROVING.style.display = "none";<?php
	}
	if ($_ISA_CURRENT_MODUL_CODE == "ARCHIVES"){ ?>
		document.all.ARCHIVES.style.display = "block";
		document.all.td_archives.className="visited";<?php
	}else{?>
		document.all.ARCHIVES.style.display = "none";<?php
	}
	if ($_ISA_CURRENT_MODUL_CODE == "REPORT"){ ?>
		document.all.REPORT.style.display = "block";
		document.all.td_report.className="visited";<?php
	}else{?>
		document.all.REPORT.style.display = "none";<?php
	}
	if ($_ISA_CURRENT_MODUL_CODE == "QA"){ ?>
		document.all.QA.style.display = "block";
		document.all.td_qa.className="visited";<?php
	}else{?>
		document.all.QA.style.display = "none";<?php
	}
	if ($_ISA_CURRENT_MODUL_CODE == "AF"){ ?>
		document.all.AF.style.display = "block";
		document.all.td_af.className="visited";<?php
	}else{?>
		document.all.AF.style.display = "none";<?php
	}
	if ($_ISA_CURRENT_MODUL_CODE == "LIST"){ ?>
		document.all.LIST.style.display = "block";
		document.all.td_list.className="visited";<?php
	}else{?>	
		document.all.LIST.style.display = "none";<?php
	}
	if ($_ISA_CURRENT_MODUL_CODE == "SYSTEM"){ ?>	
		document.all.SYSTEM.style.display = "block";
		document.all.td_system.className="visited";<?php
	}else{?>
		document.all.SYSTEM.style.display = "none";<?php
	}
	if ($_ISA_CURRENT_MODUL_CODE == "LOGIN"){ ?>
		document.all.LOGIN.style.display = "block";
		document.all.td_login.className="visited";<?php
	}else{?>	
		document.all.LOGIN.style.display = "none";<?php
	}
	if ($_ISA_CURRENT_MODUL_CODE == "SEARCH"){ ?>
		document.all.REPORT.style.display = "block";
		document.all.td_search.className="visited";<?php
	}else{?>
		document.all.REPORT.style.display = "none";<?php
	}
	//nieuvv--051108--phuc hoi ho so
	if ($_ISA_CURRENT_MODUL_CODE == "UNDO"){ ?>
		//document.all.UNDO.style.display = "block";
		document.all.td_undo.className="visited";<?php
	}
	//the-end-nieuvv-051108---
	?>
</script>